This invention relates to image processing using a neural network. More particularly, the invention relates to an image processing method and apparatus for converting an N-level image (N bits per pixel) into M-level image data (M bits per pixel; M&gt;N) such as a method and apparatus for restoring binary (two-level) image data to original multilevel image data. The invention further relates to a method and apparatus for subjecting an input image to image discrimination, and to a learning method in a neural network used in the above-described image processing.
In conventional facsimile and copying machines, an original multi-level image (e.g., one color, eight bits per pixel) is read by a CCD, subjected to an A/D conversion to reduce the number of bits to a two-level or N-level (N&lt;8) bit number, and the resulting data is transmitted or recorded. The number of bits may need to be reduced because, for example, the band of the transmission line is too narrow or because only two-level recording is possible on the recording side. Even today when transmission lines often are ISDNs and bandwidth is broader than that of conventional public telephone lines, considerable time and cost are required in order to transmit single-color, eight-bit multi-level image data.
On the recording side, on the other hand, reduction in the price of laser printers and progress in techniques for pulse modulation of recording exposure are making it possible to perform multi-level recording with excellent cost performance. In addition, it is becoming possible for the CRTs used in personal computers, work stations and the like to present 16-tone black-and-white displays and 256-color multitone displays.
Accordingly, important industrial advantages are obtained if, on the transmitting side, the original multi-level image can be binary-converted and the resulting binary (two-level) image data can be transmitted after being compressed and, on the receiving side, the received image data can be expanded and the original multi-level image can be estimated and restored in some form from the binary image data obtained.
In relation to the prior art of this type, the specification of Japanese Patent Application Laid-Open No. 61-281676 discloses a method in which an original multi-level image is binary-converted using a dither matrix comprising an N.times.M matrix, and the resulting binary image data is converted on the receiving side into multi-level image data by performing pattern matching with a known N.times.M matrix. The received binary image contains a character area and an image area that contains half tones. Though it is desired that both areas be restored from the received binary image in a form close to the original image, the image restored by pattern matching with the conventional N.times.M matrix is a smoothened image which is blurred and exhibits poor reproduced quality.
The reason for the above problem is as follows: Since density is not preserved in the inputted binary image data binary-converted by the dither method, the data obtained from this binary image data by estimating the original multiple values contains many errors. As a result, the binary image binary-converted by the dither method readily suffers image degradation at the fine lines of characters and the like. In other words, in essence it is difficult with simple pattern matching to restore a binary image, which is obtained by a binary converting method that essentially involves loss of information, into the original multi-level image. In a case where the original multi-level image is widely divergent in terms of the type and degree of picture quality, the type and degree of the binary image subsequently obtained by binary conversion also are widely divergent. Accordingly, essentially it is necessary to take into consideration this divergence in the restoration method.
Since the original image thus contains character images and half-tone images, whether the input binary image was binary-converted from a character image or restored from a half-tone image should be determined (i.e., image discrimination should be performed) at the time of restoration. Simple black and white image (without gray tones) is referred to as "character image". In order to separate a half-tone image area and a character image area from a binary image in the prior art, an edge detection filter of the kind shown in FIG. 1A is used. If such a half-tone image as in FIG. 1B is binarized, isolated dots may appear as shown in FIG. 1C. The shaded portions in FIGS. 2A through 2G are "1"s. When an edge detection operation is applied to binary images as shown in FIGS. 2A to 2G applying the filter shown of FIG. 1A and using .vertline.4.vertline. as a threshold, isolated dots (FIGS. 2A and 2G) are likely to be misjudged as being character portions, because the only values in a binary image are the extremal values "1" and "0" which is different from what is to be expected in a half-tone image.